package com.mao.gys.controller;

import com.mao.gys.entity.Supplier;
import com.mao.gys.qpage.QPage;
import com.mao.gys.service.ISupplierService;
import com.mao.gys.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/admin/supplier")
public class SupplierController {

    @Autowired
    private ISupplierService iSupplierService;

    /**
     * 获取所有的列表
     * @return
     */
    @CrossOrigin(origins = {"*"}, maxAge = 3600)
    @RequestMapping("/list")
    public Result getList(QPage qPage, Supplier obj) {
        return Result.reOk("查询成功",this.iSupplierService.getPageList(qPage,obj));
    }


}
